fix(coze-design): 修复 Tooltip 触发的 React 更新警告 - #146
Open
win5do wants to merge 1 commit into
Open
Conversation
win5do
marked this pull request as ready for review
August 3, 2026 06:15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
Semi UI 2.72.3 在 Tooltip 打开时可能输出以下 React 警告:
该问题也会影响基于 Tooltip / Popover 实现的组件,例如 DatePicker。
根因是受影响版本的 Tooltip 在
setStateupdater 内触发portalInserted事件;事件处理函数会同步计算浮层位置并再次触发 state 更新,因此被 React 判定为 updater 内的嵌套更新。相关上游记录:
上游修复已包含在 Semi UI 2.85.0 中。
修改内容
@douyinfe/semi-ui从~2.72.3升级到~2.85.0@coze-arch/coze-design添加 patch change entry影响
Tooltip 及基于 Tooltip / Popover 的组件打开时,不再产生上述 React nested-update 警告。API 使用方式不变。
验证
rush updaterush checkrush change --verify